<%@ page language="java" contentType="text/html; charset=UTF-8"
         pageEncoding="UTF-8" %>
<div class="top">
    <div class="icon">
        <a onclick="window.location.href = window.location.href.replace(/#/g,'');" class="icon-title">MIAO
            DOU</a>
    </div>
    <div class="top_left">
        <h5>
            <div id="time"></div>
           <%-- 尊敬的<strong style="color: #333">${user.agtname}</strong>，--%>欢迎使用掌连云管理平台</h5>
        <div class="top_left_right">
            <a href="http://121.40.204.191:8180/mdserver/api/demo/index.html" target="_blank">
                用户帮助
            </a>
            <a class="exit" onclick="logout();">退出</a>
        </div>
    </div>
</div>
<div class="left">
    <jsp:include page="../foreground/home/menu.jsp"></jsp:include>
</div>

<script type="text/javascript">
    function logout() {
        window.location.href = '${pageContext.request.contextPath}/logout.action?tmp=<%=System.currentTimeMillis()%>';
    }
    function editPsw() {

    }

    function userhelp() {

    }
    function go2data() {
        window.parent.mainFrame.modalDialogAlert("正在建设中......");
    }


    function t() {
        var time = document.getElementById("time");
        var d = new Date();
        var year = d.getFullYear();// 获取4位的年份
        var day = d.getDate();
        var month = d.getMonth();// 从0-11
        var week = d.getDay();// 从0-7
        /*  var hours = d.getHours();
         if(hours < 10){
         hours="0"+hours;
         }
         var minutes = d.getMinutes();
         if(minutes < 10){
         minutes = "0"+minutes;
         }
         var seconds = d.getSeconds();
         if(seconds < 10){
         seconds = "0" + seconds;
         }*/
        switch (parseInt(week)) {// 零代表礼拜天
            case 0:
                week = "星期日";
                break;// break省略后，代码会一直向下执行。直到结束或遇到break。
            case 1:
                week = "星期一";
                break;
            case 2:
                week = "星期二";
                break;
            case 3:
                week = "星期三";
                break;
            case 4:
                week = "星期四";
                break;
            case 5:
                week = "星期五";
                break;
            case 6:
                week = "星期六";
                break;
        }
        time.innerHTML = year + "年" + (month + 1) + "月" + day + "日 " + week;
        /*"+ hours + ":" + minutes + ":" + seconds;*/
    }
    t();
    /*var intervalId;// 全局变量，存储setInterval函数返回的ID值
     onload = function () {// 在窗体加载完成后绑定控件的事件。
     setInterval(t, 1000);// 1秒钟执行一次t方法。
     };*/
</script>
</script>